using System.Xml.Serialization;
using LinqToDB;
using LinqToDB.Mapping;
using NalogGarLoader.Data.Tables.GarEntries;

namespace NalogGarLoader.Data.Tables.GarEntries.ReferenceTables;

#nullable disable

[XmlRoot("OBJECTLEVEL")]
[Table(GarTypes.AS_OBJECT_LEVELS)]
public class ObjectLevel : GarEntryBase
{
    [XmlAttribute("LEVEL")]
    [PrimaryKey]
    public int Level { get; set; }

    [XmlAttribute("NAME")]
    [Column(DataType = DataType.NVarChar, Length = 250)]
    public string Name { get; set; }    

    [XmlAttribute("SHORTNAME")]
    [Column(DataType = DataType.NVarChar, Length = 50)]
    public string ShortName { get; set; }    

    [XmlAttribute("ISACTIVE")]
    [Column]
    public bool IsActive { get; set; }

    [XmlAttribute(AttributeName = "UPDATEDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime UpdateDate { get; set; }

    [XmlAttribute(AttributeName = "STARTDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime StartDate { get; set; }

    [XmlAttribute(AttributeName = "ENDDATE", DataType = "date")]
    [Column(DataType = DataType.Date)]
    public DateTime EndDate { get; set; }
}